/****************************************************
          File Name:mq_unlink.c
          Author: Abby Cin
          Mail: abbytsing@gmail.com
          Created Time: Sat 20 Sep 2014 09:42:21 AM CST
*****************************************************/

#include"posix_ipc.h"

int main(int argc,char *argv[])
{
    if(argc<2 || strcmp(argv[1],"--help")==0)
    {
        printf("%s name\n",argv[0]);
        exit(EXIT_FAILURE);
    }

    if(mq_unlink(argv[1])==-1)
        err("mq_unlink");

    printf("%s removed\n",argv[1]);
    exit(EXIT_SUCCESS);
}
